//
//  HLCategoryCourseController.m
//  HLAerospace
//
//  Created by hulian-iOS on 17/9/20.
//  Copyright © 2017年 李斌. All rights reserved.
//

#import "HLCategoryCourseController.h"
#import "HLMicroCourseController.h"
#import "HLContentCourseController.h"
#import "WRNavigationBar.h"

@interface HLCategoryCourseController ()

@end

@implementation HLCategoryCourseController

- (NSArray *)meunTitles
{
    return @[@"航天器系统",@"航天运输系统",@"航天测控系统",@"航天着陆场系统",@"空间武器系统",@"航天应用系统",@"航天发射系统",@"航天指挥控制系统"];
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    [self setUI];
}

// 添加所有子控制器
- (void)setUpAllViewController
{
    HLContentCourseController *contentCourse = [[HLContentCourseController alloc] init];
    contentCourse.title = @"课程";
    contentCourse.index = self.index;
    [self addChildViewController:contentCourse];
    
    HLMicroCourseController *microCourse = [[HLMicroCourseController alloc] init];
    microCourse.title = @"微课";
    microCourse.index = self.index;
    [self addChildViewController:microCourse];
}

- (void)setUI
{
    self.navigationItem.title = [self meunTitles][self.index - 1];
   
    // 添加所有子控制器
    [self setUpAllViewController];
    
    // 标题渐变
    [self setUpTitleGradient:^(YZTitleColorGradientStyle *titleColorGradientStyle, UIColor *__autoreleasing *norColor, UIColor *__autoreleasing *selColor) {
        *norColor = HLRGB(30, 30, 30);
        *selColor =  kColorMineBlueBG;
    }];
    
    [self setUpUnderLineEffect:^(BOOL *isUnderLineDelayScroll, CGFloat *underLineH, UIColor *__autoreleasing *underLineColor,BOOL *isUnderLineEqualTitleWidth) {
        *underLineColor = kColorMineBlueBG ;
        *isUnderLineEqualTitleWidth = YES;
    }];
}




@end
